package com.yeren.ams.provider.serviceImpl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.yeren.ams.api.model.Account;
import com.yeren.ams.api.service.AccountService;
import com.yeren.ams.api.utils.PageBean;
import com.yeren.ams.provider.dao.AccountDao;
@Service
@com.alibaba.dubbo.config.annotation.Service
public class AccountServiceImpl implements AccountService{
	
	@Autowired
	AccountDao accountDao;
	
	@Override
	public void save(Account account) {
		accountDao.save(account);
	}

	@Override
	public int delete(Integer id) {
		return accountDao.delete(id);
	}

	@Override
	public void update(Account account) {
		accountDao.update(account);
	}

	@Override
	public List<Account> findById(Integer id){
		return accountDao.findById(id);
	}

	@Override
	public List<Account> findByCondition(String condition) {
		return accountDao.findByCondition(condition);
	}

	@Override
	public List<Account> findAll(PageBean pb) {
		return accountDao.findAll(pb);
	}

	@Override
	public boolean isExitAccount(String account) {
		return accountDao.isExitAccount(account);
	}

	@Override
	public int modifyPassword(Account account) {
		return accountDao.modifyPassword(account);
	}

	@Override
	public Account login(Account account) {
		return accountDao.login(account);
	}

	
	
}
